var newVirtualGroup={
    init:function(){
        var self=this;
        self.shadeDiv = $("#shade-div");
        self.loadTree();
        self.bind();
    },
    bind:function(){
        var self=this;
        self.bindEvents();
    },
    bindEvents:function(){
        var self=this;
        $('#form2Submit').click(function(){
        	if($("#fteamname").val()==""){
        		$('#warning').setPosition().show().find("p.center").html("请输入名称");
        		self.shadeDiv.show();
        		return;
        	}
        	$('#form2').submit();
        });
    },
    loadTree:function(){
    },
    ajaxGET:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"GET", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    },
    ajaxPOST:function (url, data, fn,beforeSendFn) {
        var beforeSendFn = beforeSendFn || function(){};
        $.ajax({type:"POST", dataType:'json', context:this, url:url, data:data, success:fn, beforeSend:beforeSendFn});
    }
}
$(function(){
    newVirtualGroup.init()
})